<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>域名{$tit} - 我的管理中心</title>
{include file="head"}
<link href="/static/thinkct/css/basic.css?v=1" rel="stylesheet" type="text/css" /><script language="javascript" src="/static/thinkct/js/jquery.m.js"></script><script language="javascript" src="/static/thinkct/js/layui/layui.js"></script><script language="javascript" src="/static/thinkct/js/common.js?v=1"></script><script language="javascript" src="/static/thinkct/js/member.js?v=1"></script><link href="/static/thinkct/css/member.css?v=1" rel="stylesheet" type="text/css" /><link href="/static/thinkct/js/layui/css/layui.css" rel="stylesheet" type="text/css" /><script language="javascript" src="/static/thinkct/editor/js/wangEditor.min.js"></script><link href="/static/thinkct/editor/css/wangEditor.min.css" rel="stylesheet" type="text/css" /></head>
<body>
<!--头部-->
{include file="uhead"}

<!--头部-->
<div class="umain">
{include file="uleft"}  
<div class="uright">
<div class="mwz">
<li class="cur">域名发布</li>
{if(state('domain') == 0)}<li class="prompt r red">您当前发布信息，需要人工审核通过后才能展示！<a onclick="noauidt('domain','');" style="color: #056dae;" data="state">如何免审?</a></li>{/if}</div>
<form class="layui-form layui-font14"  name="domain" action="" method="post" enctype="multipart/form-data">
<div class="layui-form-item">
    <label class="layui-form-label">出售类型</label>
    <div class="layui-inline"><input name="type" lay-filter="type" {if $data.type!=1}checked{/if} type="radio" value="0" title="单域名出售"/><input name="type" type="radio" {if $data.type==1}checked{/if} value="1"  lay-filter="type" title="多域名出售"/>
 </div>
</div>

<div class="layui-form-item">
    <label class="layui-form-label">标题</label>
    <div class="layui-inline">
	<input  name="tit" class="layui-input" value="{$data.tit}" maxlength="50" style='width:300px;' lay-verify="tit" size="50" type="text" placeholder="一句话简单介绍下您的域名"/>
    </div> </div>

<div class="layui-form-item domain_0" >
    <label class="layui-form-label">域名</label>
    <div class="layui-input-inline">
	<input  name="name" class="layui-input" value="{$data.name}" maxlength="30" style='width:300px;' lay-verify="domain" size="30" type="text" placeholder="要售的域名，不含www，如：123.com"/>
    </div> </div>


<div class="layui-form-item">
    <label class="layui-form-label">售价</label>
    <div class="layui-input-inline">
	<input  name="money" class="layui-input" value="{$data.money}" maxlength="8" lay-verify="number" size="10" type="text" placeholder="出售的价格"/>
    </div>
	<div class="layui-form-mid layui-word-aux">元　单售填写具体价格，多售填写均价；0 则为议价</div>   
 </div>


<div class='domain_1' {if $data.type!=1}style='display:none;'{/if}><div class="layui-form-item Crequired">
<label class="layui-form-label">域名类型</label><div class="layui-input-block">
{volist name="menus.type" id="v"}<input type='checkbox' name='menus[1][0][]' value='{$v.id}'  title='{$v.name2}' >{/volist}
</div></div><div class="layui-form-item Crequired">
<label class="layui-form-label">域名后缀</label><div class="layui-input-block">
{volist name="menus.suffix" id="v"}<input type='checkbox' name='menus[1][1][]' value='{$v.id}'  title='{$v.name2}' >{/volist}
</div></div><div class="layui-form-item Crequired">
<label class="layui-form-label">注册商</label><div class="layui-input-block">
{volist name="menus.registrar" id="v"}<input type='checkbox' name='menus[1][2][]' value='{$v.id}'  title='{$v.name2}' >{/volist}
</div></div><div class="layui-form-item ">
<label class="layui-form-label">附带属性</label><div class="layui-input-block">
{volist name="menus.attribute" id="v"}<input type='checkbox' name='menus[1][3][]' value='{$v.id}'  title='{$v.name2}' >{/volist}
</div></div></div>

<div class='domain_0' {if $data.type==1}style='display:none;'{/if}><div class="layui-form-item">
<label class="layui-form-label">域名类型</label><div class="layui-input-block">
{volist name="menus.type" id="v"}
<input type='radio' name='menus[0][0][]' value='{$v.id}' {if $data.domain_type==$v.id||$i==1}checked{/if} title='{$v.name2}' >
{/volist}</div></div><div class="layui-form-item">
<label class="layui-form-label">域名后缀</label><div class="layui-input-block">
{volist name="menus.suffix" id="v"}
<input type='radio' name='menus[0][1][]' value='{$v.id}' {if $data.suffix==$v.id||$i==1}checked{/if} title='{$v.name2}' >
{/volist}</div></div><div class="layui-form-item">
<label class="layui-form-label">注册商</label><div class="layui-input-block">
{volist name="menus.registrar" id="v"}
<input type='radio' name='menus[0][2][]' value='{$v.id}' {if $data.registrar==$v.id||$i==1}checked{/if} title='{$v.name2}' >
{/volist}</div></div><div class="layui-form-item">
<label class="layui-form-label">附带属性</label><div class="layui-input-block">
{volist name="menus.attribute" id="v"}
<input type='checkbox' name='menus[0][3][]' value='{$v.id}' {if strstr($data.attribute,$v.id)}checked{/if} title='{$v.name2}' >{/volist}
</div></div></div>

 <div class="layui-form-item">
    <label class="layui-form-label">域名详情</label>
    <div class="layui-input-block form-textarea-box"><textarea name="txt"  lay-verify="txt" id='content' class="checkLen" >{$data.txt}</textarea></div> 
	</div>

<div class="layui-form-item" style='padding-bottom:15px;'>
    <label class="layui-form-label"></label>
    <div class="layui-input-block"><input type="submit" class="layui-btn" lay-submit=""  value="确认提交" /></div>
</div>

  <input type="hidden" name="bh" value="{$bh}">
  <input type="hidden" name="action" value="{$action}">
  <input type="hidden" name="passkey" value="{:passkey()}">
</form>
 </div>
</div>
{include file="bottom"}<script type="text/javascript">
function banKey(text){if(!text)return[];var str='{$bankey}',strs=decodeURIComponent(str).split(','),list=[];strs.forEach(v=>{var v=v.toLowerCase();if(text.toLowerCase().indexOf(v)>-1&&$.inArray(v,list)<0)list.push(v)});return list}layui.use('form',function(){var form=layui.form();form.verify({txt:function(value){if(value.length<20)return'域名详情不能少于20字'},domain:function(value){if(!judge(value,'domain')&&$('input[name=type]:checked').val()<=0)return'域名后缀不合法'}});form.on('radio(type)',function(data){ $(".domain_"+data.value).show();$(".domain_"+(data.value==1?0:1)).hide()});form.on('radio(change)',function(data){var $this=$(data.elem).closest("strong");$this.addClass("cur").siblings('strong').removeClass('cur');$this.nextAll(".change_box").children('.box').eq($(data.elem).attr("data")).show().siblings('.box').hide()});form.on('checkbox',function(data){if($("input[name='"+data.elem.name+"']:checked").length>=3){layer.alert("此类最多仅允许选择3项",{icon:0});$("input[name='"+data.elem.name+"']").not("input:checked").attr("disabled",true)}else if($("input[name='"+data.elem.name+"']:disabled").length>1){ $("input[name='"+data.elem.name+"']:disabled").attr("disabled",false)}else{return false}form.render('checkbox')});form.on('submit',function(data){var isOK=true,BanKeyTrue=false;$('.demandtips').remove();editor.$txt.html(editor.$txt.html().replace(/<\/?(cite)[^>]*>/gi,''));$.each(['tit','cdes','txt','azbz'],function(key,name){var input=$('[name='+name+']'),Res=banKey(input.val());if(Res.length>0){var div=input.closest(".layui-form-item"),tips='【'+div.find(".layui-form-label").html().replace(/[^0-9\u4e00-\u9fa5]/g,'')+'】含有违禁关键词：<font class="red">'+Res.join('、')+'</font>',html='<div class="demandtips" style="margin:15px 30px 0 110px;padding:8px 10px 5px 10px"><a class="close" onclick="$(this).parent().fadeOut(\'slow\');" title="关闭提示">X</a><p class="title"><i class="icons" style="margin-top:-12px"></i><b style="font-size:14px;">'+tips+'</b></p></div>';div.prev().attr('class')=='demandtips'?div.prev().find('b').html(tips):div.before(html);if(name=='txt'){Res.forEach(v=>{editor.$txt.html(editor.$txt.html().replace(new RegExp(v,"gm"),'<cite style="background:red;color:#fff;">'+v.trim()+'</cite>'))})}isOK=false;BanKeyTrue=true}});if(BanKeyTrue)scTop(".demandtips:eq(0)",15);var type=$("input[name=type]:checked").val();if(type==1){ $(".domain_1 .Crequired").each(function(){if($(this).find('input:checked').length<=0){ $name=$(this).find('label');scTop('.domain_1');layer.tips('亲，【'+$name.html()+'】至少得选一项哦！',$name);isOK=false;return false}})}if(!isOK){return false}progress(true);return true})});var editor=new wangEditor('content');editor.config.menus=['source','undo','redo','|','bold','underline','strikethrough','eraser','|','alignleft','aligncenter','alignright','table','|','fullscreen'];editor.onchange=function(){editor.$txt.find("img").remove()};editor.create();
</script>
</body>
</html>